<?php
/* @var $this BlockController */
/* @var $model Block */
/* @var $form CActiveForm */
?>

<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'block-form',
	'enableAjaxValidation'=>false,
)); ?>


<ul class="form_list form_list2">
	<li class="c_f">
		<span class="tit"><?php echo $form->labelEx($model,'zbl_title'); ?></span>
		<div class="cont f_l">
			<?php echo $form->textField($model,'zbl_title',array('size'=>30,'maxlength'=>50)); ?>
			<?php echo $form->error($model,'zbl_title'); ?>
		</div>
	</li>

	<li class="c_f">
		<span class="tit"><?php echo $form->labelEx($model,'zbl_pos'); ?></span>
		<div class="cont f_l">
			<?php echo $form->textField($model,'zbl_pos',array('size'=>30,'maxlength'=>30)); ?>
			<?php echo $form->error($model,'zbl_pos'); ?>
		</div>
	</li>

	<li class="c_f">
		<span class="tit"><?php echo $form->labelEx($model,'zbl_type'); ?></span>
		<div class="cont f_l">
			<?php echo $form->dropDownlist($model,'zbl_type',array('1'=>'HTML')); ?>		
			<?php echo $form->error($model,'zbl_type'); ?>
		</div>
	</li>

	<li class="c_f">
		<span class="tit"><?php echo $form->labelEx($model,'zbl_data'); ?></span>
		<div class="cont f_l">
		<?php  $this->widget('ext.keditor.KEditor',array(  
	            'model'=>$model,  //传入form model  
	            'name'=>'zbl_data', //设置name  
	            'properties'=>array(  
	                //设置接收文件上传的action  
	                'uploadJson'=>'/Attachment/GetAjax',  
	                //设置浏览服务器文件的action，这两个就是上面配置在/admin/default的  
	             //   'fileManagerJson'=>'/Attachment/GetAjax', 
	             	'items'=>array('source', '|', 'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold', 'italic', 'underline',
						'removeformat', '|', 'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist',
						'insertunorderedlist', '|',  'image', 'link','unlink'),	             	
	                'filterMode'=>false,
	                'newlineTag'=>'br',  
	                'allowFileManager'=>false,  
	                //传值前加js:来标记这些是js代码  
	                'afterCreate'=>"js:function() {  
	                        K('#ChapterForm_all_len').val(this.count());  
	                        K('#ChapterForm_word_len').val(this.count('text'));  
	                    }",  
	                'afterChange'=>"js:function() {  
	                        K('#ChapterForm_all_len').val(this.count());  
	                        K('#ChapterForm_word_len').val(this.count('text'));  
	                    }",	               
	            ),   
	            'textareaOptions'=>array(  
	                'style'=>'width:705px;height:261px;',  
	            )  
	        )); ?>  
		<?php echo $form->error($model,'zbl_data'); ?>
		</div>
	</li>

	<li class="c_f">
		<span class="tit"><?php echo $form->hiddenField($model,'zna_id',array('size'=>30,'maxlength'=>30)); ?>	</span>
		<div class="cont f_l">
			<?php echo $form->error($model,'zna_id'); ?>
		</div>
	</li>

	<li class="c_f">
		<span class="tit">&nbsp;</span>
		<div class="cont f_l">
			<?php echo CHtml::submitButton(Yii::t('adm','Save Date'),array('class'=>'mem_btn mem_btn20 mr5')); ?>
		</div>
	</li>

<?php $this->endWidget(); ?>

</div><!-- form -->